package com.yangxd.hospital.mapper;

import com.yangxd.hospital.entity.RoleUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.SelectKey;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author yangxd
 * @since 2021-04-24
 */
public interface RoleUserMapper extends BaseMapper<RoleUser> {
    @Select("SELECT * FROM role_user WHERE user_id = #{userId}")
    List<RoleUser> listByUserId(Integer userId);

//    @Insert("insert into role_user(role_id,user_id) values(3,#{userId})")
//    void saveRoleUser(Integer userId);



}
